import { request } from '@/utils'

export default {
    login: (data) => request.post('/system/base/access_token', data, { noNeedToken: true }),
    getUserInfo: () => request.get('/system/base/userinfo'),
    getUserMenu: () => request.get('/system/base/usermenu'),
    getUserApi: () => request.get('/system/base/userapi'),
    getSpaceList: () => request.get('/system/base/space'),
    getDeviceList: (data = {}) => request.post('/system/base/device', data),
    createDevice: (data = {}) => request.post('/system/device/update', data),
    updateDevice: (data = {}) => request.post('/system/device/update', data),
    deleteDevice: (data = {}) => request.post('/system/device/delete', data),
    getSettings: () => request.get('/system/base/settings_all'),
    getConfig: (data = {}) => request.post('/system/base/config', data),
    updateSettings: (data = {}) => request.post('/system/base/settings', data),
    getWorkbench: (params = {}) => request.get('/system/base/workbench', { params }),
    getTodoList: (data = {}) => request.post('/system/todo/list', data),
    createTodo: (data = {}) => request.post('/system/todo/create', data),
    deleteTodo: (data = {}) => request.post('/system/todo/delete', data),
    updateTodo: (data = {}) => request.post('/system/todo/update', data),
    getDepartment: (data = {}) => request.post('/system/base/department', data),
    // profile
    updatePassword: (data = {}) => request.post('/system/base/update_password', data),
    // users
    getUserList: (params = {}) => request.get('/system/users/list', { params }),
    getUserById: (params = {}) => request.get('/system/users/get', { params }),
    createUser: (data = {}) => request.post('/system/users/create', data),
    updateUser: (data = {}) => request.post('/system/users/update', data),
    updateUserSelf: (data = {}) => request.post('/system/users/update_self', data),
    deleteUser: (params = {}) => request.delete(`/system/users/delete`, { params }),
    getMeetingUsers: (data = {}) => request.post('/system/users/meeting_users', data),
    // role
    getRoleList: (params = {}) => request.get('/system/role/list', { params }),
    createRole: (data = {}) => request.post('/system/role/create', data),
    updateRole: (data = {}) => request.post('/system/role/update', data),
    deleteRole: (params = {}) => request.delete('/system/role/delete', { params }),
    updateRoleAuthorized: (data = {}) => request.post('/system/role/authorized', data),
    getRoleAuthorized: (params = {}) => request.get('/system/role/authorized', { params }),
    // menus
    getMenus: (params = {}) => request.get('/system/menu/list', { params }),
    createMenu: (data = {}) => request.post('/system/menu/create', data),
    updateMenu: (data = {}) => request.post('/system/menu/update', data),
    deleteMenu: (params = {}) => request.delete('/system/menu/delete', { params }),
    getMenusByPid: (params = {}) => request.get('/system/menu/get_list', { params }),
    // apis
    getApis: (params = {}) => request.get('/system/api/list', { params }),
    createApi: (data = {}) => request.post('/system/api/create', data),
    updateApi: (data = {}) => request.post('/system/api/update', data),
    deleteApi: (params = {}) => request.delete('/system/api/delete', { params }),
    refreshApi: (data = {}) => request.post('/system/api/refresh', data),
    // depts
    getDepts: (params = {}) => request.get('/system/dept/list', { params }),
    createDept: (data = {}) => request.post('/system/dept/create', data),
    updateDept: (data = {}) => request.post('/system/dept/update', data),
    deleteDept: (params = {}) => request.delete('/system/dept/delete', { params }),
    getDeptsTree: (params = {}) => request.get('/system/dept/tree', { params }),
    // auditlog
    getAuditLogList: (params = {}) => request.get('/system/auditlog/list', { params }),
    // app
    getApp: (params = {}) => request.get('/system/app/list', { params }),
    createApp: (data = {}) => request.post('/system/app/create', data),
    updateApp: (data = {}) => request.post('/system/app/update', data),
    deleteApp: (params = {}) => request.delete('/system/app/delete', { params }),

    //customers
    getCustomers: (params = {}) => request.get('/customers/list', { params }),
    getCustomer: (data = {}) => request.post('/customers/detail', data),
    createCustomer: (data = {}) => request.post('/customers/create', data),
    updateCustomer: (data = {}) => request.post('/customers/update', data),
    deleteCustomer: (data = {}) => request.delete('/customers/delete', data),
    CustomerHobby: (data = {}) => request.post('/customers/hobby', data),
    CustomerHobbyAdd: (data = {}) => request.post('/customers/hobby_add', data),
    CustomerData: (data = {}) => request.post('/customers/customer_data', data),
    CustomerDataAdd: (data = {}) => request.post('/customers/customer_data/add', data),
    CustomerEdit: (data = {}) => request.post('/customers/edit', data),

    getCustomerTable: (data = {}) => request.post('/customer_table/detail', data),
    updateCustomerTable: (data = {}) => request.post('/customer_table/edit', data),

    getHealthRecord: (data = {}) => request.post('/health_record/detail', data),
    updateHealthRecord: (data = {}) => request.post('/health_record/edit', data),

    //orders
    getOrders: (params = {}) => request.get('/consume/list', { params }),
    get_today_detail: (data = {}) => request.post('/consume/today_detail', data),
    get_all_detail: (params = {}) => request.get('/consume/all_detail', { params }),
    get_export_detail: (data = {}) => request.post('/consume/export_detail', data),
    get_goods_detail: (data = {}) => request.post('/consume/goods_detail', data),
    createOrder: (data = {}) => request.post('/order/create', data),
    updateOrder: (data = {}) => request.post('/order/update', data),
    deleteOrder: (data = {}) => request.delete('/order/delete', data),
    getTabGoods: (data = {}) => request.post('/order/goods', data),
    on_batPay: (data = {}) => request.post('/order/batPay', data),
    update_remark: (data = {}) => request.post('/order/edit_remark', data),
    on_pay: (data = {}) => request.post('/order/confirm', data),
    on_fkfs: (data = {}) => request.post('/order/fkfs', data),
    getCaseProjectStat: (data = {}) => request.post('/order/get_project_stat', data),
    on_cancel: (data = {}) => request.post('/order/cancel', data),
    on_check: (data = {}) => request.post('/order/check', data),
    on_refund: (data = {}) => request.post('/order/refund', data),
    get_jf: (data = {}) => request.post('/order/get_jf', data),
    use_card: (data = {}) => request.post('/order/use_card', data),
    //orders_check
    getOrderList: (params = {}) => request.get('/order/list', { params }),
    detailOrder: (data = {}) => request.post('/consume/detail', data),
    getOrderWater: (params = {}) => request.get('/order/water', { params }),
    getOrderData: (params = {}) => request.get('/order/data', { params }),
    getOrdersCard: (params = {}) => request.get('/order/order_card', { params }),
    createOrderRefund: (data = {}) => request.post('/order/tk_create', data),
    getOrderRefund: (params = {}) => request.get('/order/refund_list', { params }),
    getRefundList: (params = {}) => request.get('/order/unrefund_list', { params }),
    checkOrderRefund: (data = {}) => request.post('/order/refund_check', data),
    deleteOrderRefund: (data = {}) => request.post('/order/del_refund', data),

    //projectstat
    getProjectStat: (params = {}) => request.get('/projectStat/list', { params }),

    //cases
    createCases: (data = {}) => request.post('/cases/create', data),
    updateCases: (data = {}) => request.post('/cases/update', data),
    deleteCases: (data = {}) => request.post('/cases/cancel', data),
    createGive: (data = {}) => request.post('/cases/projectGive', data),
    getProjectGiveList: (data = {}) => request.post('/cases/projectGive_list', data),
    getCases: (data = {}) => request.post('/cases/list', data),
    printCases: (data = {}) => request.post('/cases/print', data),
    updateCasesPhoto: (data = {}) => request.post('/cases/update_photo', data),
        updateCaseNums: (data = {}) => request.post('/cases/update_nums', data),

    //return
    createReturn: (data = {}) => request.post('/return/create', data),
    getReturn: (data = {}) => request.post('/return/list', data),
    deleteReturn: (data = {}) => request.post('/return/delete', data),

    //test
    createTest: (data = {}) => request.post('/test/create', data),
    getTest: (data = {}) => request.post('/test/list', data),

    //appointment
    getAppointment: (data = {}) => request.post('/appointment/list', data),
    getAppointmentDetail: (data = {}) => request.post('/appointment/detail', data),
    createAppointment: (data = {}) => request.post('/appointment/create', data),
    updateAppointment: (data = {}) => request.post('/appointment/update', data),
    deleteAppointment: (data = {}) => request.post('/appointment/delete', data),
    getProjects: (params = {}) => request.get('/appointment/projects', { params }),
    arriveAppointment: (data = {}) => request.post('/appointment/arrive', data),
    countAppointment: (data = {}) => request.post('/appointment/count', data),
    editAppointment: (data = {}) => request.post('/appointment/edit', data),
    getAppointTime: (params = {}) => request.get('/appointment/appoint_time', { params }),

    //project
    getProjectList: (params = {}) => request.get('/project/list', { params }),
    createProject: (data = {}) => request.post('/project/create', data),
    updateProject: (data = {}) => request.post('/project/update', data),
    deleteProject: (params = {}) => request.delete(`/project/delete`, { params }),
    getProjectIni:(params = {}) => request.get('/project/ini', { params }),
    getProjectDrug:(params = {}) => request.get('/project/drug_all', { params }),

    //card
    getCardList: (params = {}) => request.get('/card/list', { params }),
    createCard: (data = {}) => request.post('/card/create', data),
    updateCard: (data = {}) => request.post('/card/update', data),
    deleteCard: (params = {}) => request.delete(`/card/delete`, { params }),
    getProjectsAll:(params = {}) => request.get('/card/projects_all', { params }),
    getProjectsAllTree:(params = {}) => request.get('/card/projects_all_tree', { params }),

    //Coupon
    getCouponList: (params = {}) => request.get('/coupon/list', { params }),
    createCoupon: (data = {}) => request.post('/coupon/create', data),
    updateCoupon: (data = {}) => request.post('/coupon/update', data),
    deleteCoupon: (params = {}) => request.delete(`/coupon/delete`, { params }),
    getGoodsAll:(params = {}) => request.get('/coupon/goods_all', { params }),

    //CouponUse
    getCouponUseList: (params = {}) => request.get('/coupon_use/list', { params }),
    createCouponUse: (data = {}) => request.post('/coupon_use/create', data),
    updateCouponUse: (data = {}) => request.post('/coupon_use/update', data),
    deleteCouponUse: (params = {}) => request.delete(`/coupon_use/delete`, { params }),
    getCouponAll:(params = {}) => request.get('/coupon_use/coupon_all', { params }),

    //UserYeji
    getUserYejiList: (params = {}) => request.get('/user_yeji/list', { params }),
    createUserYeji: (data = {}) => request.post('/user_yeji/create', data),
    updateUserYeji: (data = {}) => request.post('/user_yeji/update', data),
    deleteUserYeji: (params = {}) => request.delete(`/user_yeji/delete`, { params }),

    //UserYongjin
    getUserYongjinList: (params = {}) => request.get('/user_yongjin/list', { params }),
    getUserYongjinTotal: (params = {}) => request.get('/user_yongjin/total', { params }),
    createUserYongjin: (data = {}) => request.post('/user_yongjin/create', data),
    updateUserYongjin: (data = {}) => request.post('/user_yongjin/update', data),
    deleteUserYongjin: (params = {}) => request.delete(`/user_yongjin/delete`, { params }),

    //UserServicefee
    getUserServicefeeList: (params = {}) => request.get('/user_servicefee/list', { params }),
    createUserServicefee: (data = {}) => request.post('/user_servicefee/create', data),
    updateUserServicefee: (data = {}) => request.post('/user_servicefee/update', data),
    deleteUserServicefee: (params = {}) => request.delete(`/user_servicefee/delete`, { params }),

    //ProjectGive
    getProjectGiveListAll: (params = {}) => request.get('/project_give/list', { params }),
    createProjectGive: (data = {}) => request.post('/project_give/create', data),
    updateProjectGive: (data = {}) => request.post('/project_give/update', data),
    checkProjectGive: (data = {}) => request.post('/project_give/check', data),
    deleteProjectGive: (params = {}) => request.delete(`/project_give/delete`, { params }),

    //Invoice
    getInvoiceList: (params = {}) => request.get('/invoice/list', { params }),
    createInvoice: (data = {}) => request.post('/invoice/create', data),
    updateInvoice: (data = {}) => request.post('/invoice/update', data),
    deleteInvoice: (params = {}) => request.delete(`/invoice/delete`, { params }),

    // storeroom
    getDrugsList: (params = {}) => request.get('/drugs/list', { params }),
    createDrugs: (data = {}) => request.post('/drugs/create', data),
    updateDrugs: (data = {}) => request.post('/drugs/update', data),
    deleteDrugs: (params = {}) => request.delete(`/drugs/delete`, { params }),
    getDrugsAll:(params = {}) => request.get('/drugs/all', { params }),
    getDrugsUse:(params = {}) => request.get('/drugs/drugs_use', { params }),

    // Assets
    getAssets: (data = {}) => request.post('/assets/list', data),
    createAssets: (data = {}) => request.post('/assets/create', data),
    updateAssets: (data = {}) => request.post('/assets/update', data),
    deleteAssets: (params = {}) => request.delete(`/assets/delete`, { params }),

    // fenzhen
    getFenzhenList: (params = {}) => request.get('/fenzhen/list', { params }),
    createFenzhen: (data = {}) => request.post('/fenzhen/create', data),
    updateFenzhen: (data = {}) => request.post('/fenzhen/update', data),
    deleteFenzhen: (params = {}) => request.delete(`/fenzhen/delete`, { params }),

    // drugs-bills
    getDrugsBillsList: (params = {}) => request.get('/drugsbills/list', { params }),
    createDrugsBills: (data = {}) => request.post('/drugsbills/create', data),
    updateDrugsBills: (data = {}) => request.post('/drugsbills/update', data),
    deleteDrugsBills: (params = {}) => request.delete(`/drugsbills/delete`, { params }),
    getDrugsDepository: (params = {}) => request.get('/drugsbills/getDrugsDepository', { params }),
    getDrugsNumber: (params = {}) => request.get('/drugsbills/getDrugsNumber', { params }),

    getDrugsBillsDetailList: (params = {}) => request.get('/drugsbills_detail/list', { params }),
    getDrugsStatList: (params = {}) => request.get('/drugs_stat/list', { params }),
    getDrugsDepositoryList: (params = {}) => request.get('/drugs_stat/depository', { params }),

    // Material
    getMaterialTemp: (data = {}) => request.post('/material/template', data),
    createMaterial: (data = {}) => request.post('/material/create', data),
    updateMaterial: (data = {}) => request.post('/material/update', data),
    deleteMaterial: (data = {}) => request.post('/material/delete', data),

    // Medicines
    getMedicine: (params = {}) => request.get('/medicine/list', { params }),
    createMedicine: (data = {}) => request.post('/medicine/create', data),
    updateMedicine: (data = {}) => request.post('/medicine/update', data),
    deleteMedicine: (data = {}) => request.post('/medicine/delete', data),


    // UserTogether
    getUserTogether: (params = {}) => request.get('/together/list', { params }),
    createUserTogether: (data = {}) => request.post('/together/create', data),
    updateUserTogether: (data = {}) => request.post('/together/update', data),
    deleteUserTogether: (data = {}) => request.post('/together/delete', data),

    //Home
    get_no_arrive: (data = {}) => request.post('/home/get_no_arrive', data),
    get_arrived: (data = {}) => request.post('/home/get_arrive', data),
    get_customer_rank: (data = {}) => request.post('/home/customer_rank', data),
    get_table_data: (data = {}) => request.post('/home/table_data', data),
    operateDoing: (data = {}) => request.post('/home/operateDoing', data),
    operateDone: (data = {}) => request.post('/home/operateDone', data),
    get_depusers: (data = {}) => request.post('/home/get_depusers', data),
    select_depusers: (data = {}) => request.post('/home/select_depusers', data),
    cancel_depusers: (data = {}) => request.post('/home/cancel_depusers', data),
    get_my_arrive: (data = {}) => request.post('/home/get_my_arrive', data),
    on_leave: (data = {}) => request.post('/home/on_leave', data),
    appointmentV2: (data = {}) => request.post('/home/appointmentV2', data),


    //interviews
    getInterviews: (data = {}) => request.post('/interview/list', data),
    createInterviews: (data = {}) => request.post('/interview/create', data),
    updateInterviews: (data = {}) => request.post('/interview/update', data),
    deleteInterviews: (data = {}) => request.post('/interview/delete', data),

    getSigns: (params = {}) => request.get('/sign/sign_form_list', { params }),
    createSigns: (data = {}) => request.post('/sign/sign_create', data),
    updateSigns: (data = {}) => request.post('/sign/sign_update', data),
    deleteSigns: (data = {}) => request.post('/sign/sign_delete', data),
    getCustomerSigns: (params = {}) => request.get('/sign/sign_list', { params }),
    createCustomerSign: (data = {}) => request.post('/sign/sign_create', data),
    updateCustomerSign: (data = {}) => request.post('/sign/sign_update', data),
    deleteCustomerSign: (data = {}) => request.post('/sign/sign_delete', data),

    //Assets
    getFinanceAssetsList: (params = {}) => request.get('/assets/lists', { params }),
    createFinanceAssets: (data = {}) => request.post('/assets/add', data),
    updateFinanceAssets: (data = {}) => request.post('/assets/update', data),
    deleteFinanceAssets: (params = {}) => request.delete(`/assets/delete`, { params }),

    getVisit: (data = {}) => request.post('/visit/list', data),
    createVisit: (data = {}) => request.post('/visit/create', data),
    updateVisit: (data = {}) => request.post('/visit/update', data),
    deleteVisit: (data = {}) => request.post('/visit/delete', data),

    // survey (使用signs接口)
    getSurveys: (params = {}) => request.get('/sign/sign_form_list', { params }),
    getSurvey: (params = {}) => request.get('/sign/sign_form_get', { params }),
    createSurvey: (data = {}) => request.post('/sign/sign_form_create', data),
    updateSurvey: (data = {}) => request.post('/sign/sign_form_update', data),
    deleteSurvey: (params = {}) => request.post('/sign/sign_form_delete', params),
    submitSurveyAnswer: (data = {}) => request.post('/sign/create', data),
    getSurveyAnswers: (params = {}) => request.get('/sign/user_sign', { params }),
    updateSurveyAnswer: (data = {}) => request.post('/sign/sign_answer_update', data),

    // doctor schedule (医生排班)
    getDoctorSchedules: (data = {}) => request.post('/doctor_schedule/list', data),
    createDoctorSchedule: (data = {}) => request.post('/doctor_schedule/create', data),
    updateDoctorSchedule: (data = {}) => request.post('/doctor_schedule/update', data),
    deleteDoctorSchedule: (data = {}) => request.post('/doctor_schedule/delete', data),
    getDoctorScheduleDetail: (data = {}) => request.post('/doctor_schedule/detail', data),
    toggleDoctorSchedule: (data = {}) => request.post('/doctor_schedule/toggle', data),
    batchCreateDoctorSchedule: (data = {}) => request.post('/doctor_schedule/batch_create', data),
    getDoctorScheduleStats: (data = {}) => request.post('/doctor_schedule/stats', data),
    getDoctorScheduleCalendar: (data = {}) => request.post('/doctor_schedule/calendar', data),
    getDoctors: (params = {}) => request.get('/doctor_schedule/doctors', { params }),
}


